package com.qin.mall.openfeign.discount;

import com.qin.mall.common.api.CommonResult;
import com.qin.malldiscount.domain.SmsFlashPromotionSession;
import com.qin.malldiscount.dto.SmsFlashPromotionSessionDetail;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 *  限时购场次管理 远程调用
 * @author Leisure
 * create 2022 2022/11/24 23:27
 **/
@FeignClient("discount-manage")
public interface SmsFlashPromotionSessionFeigin {

    /**
     * 添加场次
     */
    @PostMapping("/flashSessionManage/create")
    @ResponseBody
    public CommonResult create(@RequestBody SmsFlashPromotionSession promotionSession);

    /**
     * 修改场次
     */
    @RequestMapping("/flashSessionManage/update/{id}")
    @ResponseBody
    public CommonResult update(@PathVariable Long id, @RequestBody SmsFlashPromotionSession promotionSession);

    /**
     * 修改启用状态
     */
    @PostMapping("/flashSessionManage/update/status/{id}")
    @ResponseBody
    public CommonResult updateStatus(@PathVariable Long id,@RequestParam Integer status);

    /**
     * 删除场次
     */
    @PostMapping("/flashSessionManage/delete/{id}")
    @ResponseBody
    public CommonResult delete(@PathVariable Long id);

    /**
     * 获取场次详情
     */
    @GetMapping("/flashSessionManage/{id}")
    @ResponseBody
    public CommonResult<SmsFlashPromotionSession> getItem(@PathVariable Long id);

    /**
     * 获取全部场次
     */
    @GetMapping("/flashSessionManage/list")
    @ResponseBody
    public CommonResult<List<SmsFlashPromotionSession>> list();

    /**
     * 获取全部可选场次及其数量
     */
    @PostMapping("/flashSessionManage/selectList")
    @ResponseBody
    public CommonResult<List<SmsFlashPromotionSessionDetail>> selectList(@RequestParam Long flashPromotionId);
    
    
}
